Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discover] Support ES|QL statements without FROM clause #179020

Closed
wants to merge 6 commits into from

Conversation

mattkime
Copy link
Contributor

@mattkime mattkime commented Mar 20, 2024

Summary

Supply an empty data view when there's no FROM clause and therefore no field list.

Closes #163417

@mattkime mattkime self-assigned this Mar 20, 2024
@mattkime mattkime added Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) Feature:ES|QL ES|QL related features in Kibana Feature:Discover Discover Application labels Mar 20, 2024
@mattkime mattkime changed the title supply data view without index pattern [discover] Support ES|QL statements without FROM clause Mar 20, 2024
@mattkime mattkime added the release_note:skip Skip the PR/issue when compiling release notes label Mar 20, 2024
Comment on lines 28 to 30
if (indexPatternFromQuery === '') {
return new DataView({ fieldFormats: services.fieldFormats });
}
Copy link
Member

@kertal kertal Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good from my end, it's great, that we are now be able to do this, and no longer persist a "foreign" data view in this case. question is, if this could be further optimized, we're saving redundant settings here
Bildschirmfoto 2024-03-21 um 18 57 27

neither title, nor sourceFilters, nor fieldFormats, nor runtimeFieldMap, ...
would be necessary to be persisted as serialized values, since those are just defaults. just persisting what's necessary, would also make it easier to debug, and save a bit of space (not much, but well, a tiny little bit)

Copy link
Contributor Author

@mattkime mattkime Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created this as to address it as a separate issue - #180429

@mattkime
Copy link
Contributor Author

mattkime commented Apr 9, 2024

/ci

1 similar comment
@mattkime
Copy link
Contributor Author

/ci

@mattkime
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 592.3KB 592.3KB -18.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @mattkime

@kertal
Copy link
Member

kertal commented Apr 26, 2024

I guess this can be closed?

@mattkime mattkime closed this Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ESQL] Support commands which dont need an index
3 participants